import Vue from 'vue'
import VueRouter from 'vue-router'
import SiteHome from 'pages/siteHome'
import BlogHome from 'pages/blogHome'
import LiveNote from 'pages/blogHome/livenote'
import SkillNote from 'pages/blogHome/skillNote'
import LeaveMessage from 'pages/blogHome/leavemsg'
import Interflow from 'pages/blogHome/interflow'
import AboutHost from 'pages/blogHome/abouthost'

Vue.use(VueRouter)

const routes = [
    {
        name: 'sitehome',
        path: '/sitehome',
        component: SiteHome
    },
    {
        name: 'bloghome',
        path: '/bloghome',
        component: BlogHome,
        children: [
            {
                name: 'home',
                path: 'home',
                redirect: '/home'
            },
            {
                name: 'livenote',
                path: 'livenote',
                component: LiveNote
            },
            {
                name: 'skillnote',
                path: 'skillnote',
                component: SkillNote
            },
            {
                name: 'abouthost',
                path: 'abouthost',
                component: AboutHost
            },
            {
                name: 'leavemsg',
                path: 'leavemsg',
                component: LeaveMessage
            },
            {
                name: 'interflow',
                path: 'interflow',
                component: Interflow
            }
        ]
    }

];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
